//
//  webViewController.m
//  QuickReadComic
//
//  Created by 苗钧豪 on 16/9/21.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "webViewController.h"
#import "MainViewController.h"

@interface webViewController ()

@end

@implementation webViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"快看漫画";
    self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
    UIImage *image = [UIImage imageNamed:@"IMG_0425"];
    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithImage:[image imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)] style:(UIBarButtonItemStylePlain) target:self action:@selector(back)];
    self.navigationItem.leftBarButtonItem = item;
    // Do any additional setup after loading the view.
    _webview = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.urlStr]];
    [_webview loadRequest:request];
    [self.view addSubview:_webview];
}
- (void)back {
    MainViewController *vc = [[MainViewController alloc]init];
    [UIApplication sharedApplication].keyWindow.rootViewController = vc;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
